<?php

namespace App\Providers;

use App\Models\Customer;
use App\Models\Group;
use App\Models\Project;
use App\Models\Role;
use App\Models\User;
use App\Policies\CustomerPolicy;
use App\Policies\GroupPolicy;
use App\Policies\MsgPolicy;
use App\Policies\ProjectPolicy;
use App\Policies\RolePolicy;
use App\Policies\UserPolicy;
use Laravel\Passport\Passport;
use Illuminate\Support\Facades\Gate;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;

class AuthServiceProvider extends ServiceProvider
{
    /**
     * The policy mappings for the application.
     *
     * @var array
     */
    protected $policies = [
        //'App\Model' => 'App\Policies\ModelPolicy',
        Customer::class=>CustomerPolicy::class,
        Group::class=>GroupPolicy::class,
        Project::class=>ProjectPolicy::class,
        Role::class=>RolePolicy::class,
        User::class=>UserPolicy::class,
    ];

    /**
     * Register any authentication / authorization services.
     *
     * @return void
     */
    public function boot()
    {
        $this->registerPolicies();
        Passport::routes();
    }
}
